package com.mass.waybill.order.service;

import com.mass.core.utils.AjaxResponse;
import com.mass.waybill.order.model.WbShippingOrder;

/**
 * @Author: ZSX
 * @Description: 订单service 接口
 */
public interface WbShippingOrderService {

    /**
     * 增加
     *
     * @param wbShippingOrder
     */
    int insert(WbShippingOrder wbShippingOrder);

    /**
     * 通过id删除
     *
     * @param wbShippingOrderId
     */
    int delete(Long wbShippingOrderId);

    /**
     * 修改  包含费用明细  费用明细不能为空
     *
     * @param wbShippingOrder
     */
    int update(WbShippingOrder wbShippingOrder);

    /**
     * 修改 不包含费用明细
     *
     * @param wbShippingOrder
     */
    int updateWbShippingOrder(WbShippingOrder wbShippingOrder);

    /**
     * 通过id查找
     *
     * @param wbShippingOrderId
     * @return
     */
    WbShippingOrder selectById(Long wbShippingOrderId);

    /**
     * 通过orderCode查找
     *
     * @param orderCode
     * @return
     */
    WbShippingOrder selectByOrderCode(String orderCode);

    /**
     * 通过输入参数分页查找
     *
     * @param wbShippingOrderInput
     * @return
     */
    AjaxResponse selectPage(WbShippingOrder wbShippingOrder, Integer page, Integer limit);


    /**
     * 已冲销金额
     *
     * @param totalAmount 已冲销总金额
     * @param orderCode   订单编号
     * @return
     */
    int sterilisation(String totalAmount, String orderCode);
}
